﻿using System.Data;

namespace MxWeiXinPF.BLL
{

    public partial class user_rate
    {
        // Fields
        private DAL.user_rate dal;
        private readonly Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(); //获得站点配置信息

        // Methods
        public user_rate()
        {
            this.dal = new DAL.user_rate(this.siteConfig.sysdatabaseprefix);
        }

        public int Add(int wid, string openid, string truename, string bank, string bankNO, string phone, string address)
        {
            return this.dal.Add(wid, openid, truename, bank, bankNO, phone, address);
        }

        public int AddPoints(int wid,int shopid, string openid, int uid, string status, string ratetype, string remarks)
        {
            return this.dal.AddPoints(wid, shopid,openid, uid, status, ratetype, remarks);
        }

        public bool AdminDelete(int id)
        {
            return this.dal.AdminDelete(id);
        }

        public DataSet AdminGetListByConfirmCode(string confirmcode)
        {
            return this.dal.AdminGetListByConfirmCode(confirmcode);
        }

        public DataSet AdminGetListByID(int id)
        {
            return this.dal.AdminGetListByID(id);
        }

        public DataSet AdminGetListScore(int wid, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return this.dal.AdminGetListScore(wid, pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }
        public DataSet AdminGetListScoreEx(int wid, int shopid, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return this.dal.AdminGetListScoreEx(wid, shopid, pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }
        public bool AuditExists(int id)
        {
            return this.dal.AuditExists(id);
        }

        public bool AuditPoints(string status, string confirmcode, int id)
        {
            return this.dal.AuditPoints(status, confirmcode, id);
        }

        public bool Delete(int id)
        {
            return this.dal.Delete(id);
        }

        public DataSet GetBank(string openid)
        {
            return this.dal.GetBank(openid);
        }

        public DataSet GetBankByID(int id)
        {
            return this.dal.GetBankByID(id);
        }

        public string GetCode(int id)
        {
            return this.dal.GetCode(id);
        }

        public DataSet GetDateSet(int Top, int wid, string startdate, string enddate, string keyword)
        {
            return this.dal.GetDateSet(Top, wid, startdate, enddate, keyword);
        }

        public DataSet GetDateSet(int wid, int shopid, int pageSize, int pageIndex, string startdate, string enddate, string keyword, out int recordCount)
        {
            return this.dal.GetDateSet(wid, shopid, pageSize, pageIndex, startdate, enddate, keyword, out recordCount);
        }

        public DataSet GetDateSetByOpenID(string openid)
        {
            return this.dal.GetDateSetByOpenID(openid);
        }

        public DataSet GetDateSetByWidOpenID(string openid)
        {
            return this.dal.GetDateSetByWidOpenID(openid);
        }

        public DataSet GetDateSetForExcel(int wid, int shopid, string startdate, string enddate, string keyword, out int recordCount)
        {
            return this.dal.GetDateSetForExcel(wid, shopid, startdate, enddate, keyword, out recordCount);
        }

        public DataSet GetListScore(int wid, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return this.dal.GetListScore(wid, pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }

        public bool Update(int wid, string openid, string truename, string bank, string bankNO, string phone, string address, int id)
        {
            return this.dal.Update(wid, openid, truename, bank, bankNO, phone, address, id);
        }

        public bool UpdatePoints(int shopid, decimal amount, string remarks, string confirmcode, int id)
        {
            return this.dal.UpdatePoints(shopid, amount, remarks, confirmcode, id);
        }
    }
}
 
